package com.lct.d1_static_field;

public class Test1 {
    public static void main(String[] args) {
        //1.类名、静态变量（推荐的方式）
        Student.name = "袁华";
        System.out.println(Student.name);


        //对象、静态变量
        Student s1 = new Student();
        s1.name = "马冬梅";

        Student s2 = new Student();
        s2.name = "秋雅";

        System.out.println(s2.name); // 秋雅

        //2.对象，实例变量
        s1.age = 23;
        s2.age = 18;
        System.out.println(s1.age); //23


    }



}
